<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>Users:</div>
    <ul>
      <li>John</li>
      <li>Pete</li>
    </ul>
    <script>
      // 可读
      console.log(document.body.children[0]);
      console.log(document.body.children[1]);
      console.log(document.body.children[0].nextElementSibling);
      console.log(document.body.children[1].children[1]);

      // elem.lastChild.nextSibling===null
      // elem.children[0].previousSibling===null
    </script>
  </body>
</html>
